package com.gemme.gemme.view;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.gemme.gemme.R;

public class DeleteDialog {
    CenterDialog dialog;
    private Context mContext;

    public void showDialog(Context mContext){
//new int[]{R.id.close}
        dialog = new CenterDialog(mContext, R.layout.delete_dialog,
                null);
        this.mContext = mContext;

        dialog.show();
        initView();
/*
        dialog.setOnBottomItemClickListener(new BottomDialog.OnBottomItemClickListener() {
            @Override
            public void onBottomItemClick(BottomDialog dialog, View view) {
                switch (view.getId()) {
                    case R.id.close:
                        dialog.dismiss();
                        break;

                }
            }
        });
*/
    }

    TextView tv_confirm;
    private void initView() {
        View view = dialog.getView();
        view.findViewById(R.id.tv_cancle).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dialog.dismiss();
            }
        });
        tv_confirm = view.findViewById(R.id.tv_confirm);

    }

    public TextView getTv_confirm() {
        return tv_confirm;
    }

    public void dismisss(){
        dialog.dismiss();
    }
}
